project(Catalogs)
cmake_minimum_required(VERSION 2.6)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../cmake_modules/")
Include (CheckCXXSourceCompiles)
find_package(Qt4 REQUIRED)
find_package(Nova REQUIRED)

include_directories(${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR} ${NOVA_INCLUDE_DIR})

set(Catalogs_SRCS  htm.c StarEntry.cpp Catalog.cpp IV22.cpp BSC.cpp KStars.cpp Catalogs.cpp main.cpp)
set(LibCatalog_SRCS  htm.c StarEntry.cpp Catalog.cpp IV22.cpp BSC.cpp KStars.cpp)
set(Catalogs_FORMS StarCatalog.ui)
set(Catalogs_HEADERS htm.h StarEntry.h Catalog.h IV22.h BSC.h KStars.h Catalogs.h)

qt4_wrap_cpp(Catalogs_HEADERS_MOC ${Catalogs_HEADERS})
qt4_wrap_ui(Catalogs_FORMS_HEADERS ${Catalogs_FORMS})

add_executable(Catalogs ${Catalogs_SRCS} ${Catalogs_HEADERS_MOC} ${Catalogs_FORMS_HEADERS})

add_library(Catalog ${LibCatalog_SRCS} ${Catalogs_HEADERS_MOC})

target_link_libraries(Catalogs ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${NOVA_LIBRARIES})

install(TARGETS Catalogs RUNTIME DESTINATION bin)

